<#macro pages>
<#assign pageNo=page.getPageNo()?default('1') />
<form id="filterPageForm" name="filterPageForm" method="post" action="${request.getRequestUri()}" onsubmit="return checkForm()">
<input name="page.pageNo" id="page.pageNo" value="${pageNo}" type="hidden" />
<#list RequestParameters?default({})?keys as list>
<#if list!='page.pageNo'>
	<input type="hidden" name="${list}" id="${list}" value="${RequestParameters[key]}"/>
	</#if>
</#list>
</form>
<script language="javascript">
    function filterPageForm_submit(page){
    	if(page){
    	document.getElementById("page.pageNo").value=page;
    	}
	    document.filterPageForm.submit();
    }
</script>
第${pageNo}页, 共${page.getTotalPages()?default('')}页 
		<a href="javascript:filterPageForm_submit(1);">首页</a>
		<#if (pageNo?number-3>0)>
			...&nbsp;
		</#if>
		<#if (pageNo?number-2>0)>
			<a href="javascript:filterPageForm_submit(${pageNo-2});">${pageNo?default('0')?number-2}</a>&nbsp;
		</#if>
		<#if (pageNo?number-1>0)>
			<a href="javascript:filterPageForm_submit(${pageNo-1});">${pageNo-1}</a>&nbsp;
		</#if>
		<#if (pageNo?number>0)>
			${pageNo}&nbsp;
		</#if>
		<#if (page.getTotalPages()?default('0')?number>=pageNo?number+1)>
			<a href="javascript:filterPageForm_submit(${pageNo+1});">${pageNo+1}</a>&nbsp;
		</#if>
		<#if (page.getTotalPages()?default('0')?number>=pageNo?number+2)>
			<a href="javascript:filterPageForm_submit(${pageNo+2});">${pageNo+2}</a>&nbsp;
		</#if>
		<#if (page.getTotalPages()?default('0')?number>=pageNo?number+3)>
			<a href="javascript:filterPageForm_submit(${pageNo+3});">${pageNo+3}</a>&nbsp;
		</#if>
		<#if (page.getTotalPages()?default('0')?number>=pageNo?number+4)>
			<a href="javascript:filterPageForm_submit(${pageNo+4});">${pageNo+4}</a>&nbsp;
		</#if>
		<#if (page.getTotalPages()?default('0')?number>=pageNo?number+5)>
			...&nbsp;
		</#if>
		<a href="javascript:filterPageForm_submit(${page.getTotalPages()});" >末页</a>
</#macro>

